package com.example.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

@Data
@NoArgsConstructor //自动生成无参构造函数
public class TbBookBase {

    private long bookId;
    private String bookName;
    private long sellingPrice;
    @ApiModelProperty("作者名")
    @NotEmpty(message = "作者名不能为空")
    private String bookWriter;
    private Integer bookSale;
    private long categoryId;
    @ApiModelProperty("书籍介绍")
    @NotEmpty(message = "书籍介绍不能为空")
    private String bookInfo;
    private String bookImg;
    private long updateUserId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

}
